/*************************************************
*      Filename: tools_kf.cu
*        Coding: utf-8
*        Author: Zheng Li
*         Email: lizheng@galasports.net
*      HomePage: http://www.galasports.net
*  Copyright(C): InnoReal Technology Co.,Ltd.
*       Version: 0.0.1
*    CreateDate: 2018-08-13 17:01:25
*    LastChange: 2018-08-13 17:01:28
*          Desc: 
*       History: 
*************************************************/
#include "tools_kf.h"

//template <typename T>
//void KeyFrameTools<T>::saveVector(std::string prePath, int K, int iter, int startF, T L){
//  std::fstream file;
//  std::string  fileKeyFrame = prePath+std::to_string(K)+"_iter"+std::to_string(iter)+".csv";
//  file.open(fileKeyFrame.c_str(),std::ios::out);
//  int N=L.size();
//  std::cout<<N<<std::endl;
//  for(int i=0;i<N;i++){
//    file<<startF+i<<","<<L[i]<<std::endl;
//  }
//  file.close();
//}
void KeyFrameTools::saveVector(std::string prePath, int K, int iter, int startF, std::vector<int> L){
  std::fstream file;
  std::string  fileKeyFrame = prePath+std::to_string(K)+"_iter"+std::to_string(iter)+".csv";
  file.open(fileKeyFrame.c_str(),std::ios::out);
  int N=L.size();
  std::cout<<N<<std::endl;
  for(int i=0;i<N;i++){
    file<<startF+i<<","<<L[i]<<std::endl;
  }
  file.close();
}
void KeyFrameTools::saveVector(std::string prePath, int K, int iter, int startF, std::vector<double> L){
  std::fstream file;
  std::string  fileKeyFrame = prePath+std::to_string(K)+"_iter"+std::to_string(iter)+".csv";
  file.open(fileKeyFrame.c_str(),std::ios::out);
  int N=L.size();
  std::cout<<N<<std::endl;
  for(int i=0;i<N;i++){
    file<<startF+i<<","<<L[i]<<std::endl;
  }
  file.close();
}
//template<typename T>
//void KeyFrameTools<T>::temp(std::string prePath, T a) {
//  std::cout<<prePath<<a<<std::endl;
//}
